﻿<UserControl x:Class="Microsoft.Forums.ForumsClient.Views.StatusBarView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:Views="clr-namespace:Microsoft.Forums.ForumsClient.Views"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <UserControl.Resources>
        <Views:ConnectionStatusConverter x:Key="ConnectionConverter" />
    </UserControl.Resources>
    <Grid>
        <StatusBar x:Uid="AppStatusBar" x:Name="AppStatusBar" Visibility="Visible"  
                   Width="Auto" Height="Auto" DockPanel.Dock="Bottom">
            <StatusBarItem x:Uid="AppStatusBarMessageItem" x:Name="AppStatusBarMessageItem" Foreground="#FFFFFF"  />
            <StatusBarItem x:Uid="StatusBarItem_1" HorizontalAlignment="Right">
                <Image x:Uid="Image_2" Width="24" Height="24"  
                       ToolTipService.Placement="Left" 
                       ToolTipService.HasDropShadow="True" >
                    <Image.Source>
                        <MultiBinding Converter="{StaticResource ConnectionConverter}" ConverterParameter="Image">
                            <MultiBinding.Bindings>
                                <Binding Path="Network.IsConnected" />
                                <Binding Path="CurrentUser.LogOnState" />
                            </MultiBinding.Bindings>
                        </MultiBinding>
                    </Image.Source>
                    <Image.ToolTip>
                        <MultiBinding Converter="{StaticResource ConnectionConverter}" ConverterParameter="Text">
                            <MultiBinding.Bindings>
                                <Binding Path="Network.IsConnected" />
                                <Binding Path="CurrentUser.LogOnState" />
                            </MultiBinding.Bindings>
                        </MultiBinding>
                    </Image.ToolTip>
                </Image>
            </StatusBarItem>
        </StatusBar>
    </Grid>
</UserControl>
